Repository navigation
Docs: stop telling Flutter developers to exclude arm64 from the iOS simulator build - #596
amitthacker-maker wants to merge 2 commits into
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
…imulator build
Four Flutter setup pages carried a Podfile line setting EXCLUDED_ARCHS for the
iPhone simulator to 'arm64 i386', and a Warning below it telling Apple Silicon
readers to narrow that to 'i386'. So each page held both the wrong instruction
and its correction, with the wrong one in the copyable code block. On an Apple
Silicon Mac the simulator runs on arm64, so a reader who copied the block
removed the only architecture the simulator can use and the build stopped
working.
Narrowing to 'i386' would not have been right either, so the line is removed
and the Podfile step with it.
For each page I followed the dependency the page itself tells the reader to
install, down to the iOS framework it resolves to, and read that XCFramework's
own Info.plist. All three generations ship an arm64 simulator library:
sdk/flutter/setup.mdx
cometchat_sdk ^5.0.8 (5.0.9) -> CometChatSDK 4.1.0
ios-arm64_x86_64-simulator, archs [arm64, x86_64]
sdk/flutter/v4/setup.mdx
cometchat_sdk ^4.0.33 -> CometChatSDK 4.0.73
ios-arm64_x86_64-simulator, archs [arm64, x86_64]
sdk/flutter/3.0/overview.mdx, sdk/flutter/3.0/setup.mdx
cometchat: any (3.0.13) -> CometChatPro 3.0.920
ios-arm64_x86_64-simulator, archs [arm64, x86_64]
The i386 half of the setting is inert. No supported Xcode builds an i386
simulator slice, and each of these three plugin versions already sets
EXCLUDED_ARCHS to 'i386' in its own podspec, so the reader never needed to write
it.
The Podfile block held nothing but that line plus Flutter's own default
post_install boilerplate, so the whole step goes and the steps after it are
renumbered. Each Warning is replaced by a Note telling anyone who already
followed the old page to take the exclusion out of their Podfile, since they are
the readers who are actually broken.
iOS calling pages are deliberately untouched and under separate review.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…l page The last page still setting EXCLUDED_ARCHS to 'arm64 i386' in a build snippet. On an Apple Silicon Mac the iPhone simulator runs arm64, so the setting stops the app building for the simulator. The exclusion line is gone and the Apple Silicon warning underneath it, which told the reader to exclude only i386, is replaced by a note for anyone upgrading an existing app. The note does not repeat the claim about the plugin excluding i386 on its own, which is unverified. The two other React Native pages that carried this line, calling-integration and call-features, were rewritten on main and no longer have it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ca02078 to
275231c
Compare
|
Rebased onto What this fixesThese pages told developers to put this in their Podfile: build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'Every Mac sold since late 2020 is Apple Silicon, and the iPhone simulator on those machines runs arm64. Excluding arm64 leaves no slice to build for the simulator, so a developer who follows the setup guide line by line hits a failed simulator build on the step right after install. That is the happiest path we have. It also removes a contradiction.
What changed
After this, Rebase detailThe conflict was in One thing for the reviewerThe note on all four Flutter pages says the plugin "already excludes The behaviour described here is reasoned from how |
What these pages told developers to do
Four Flutter setup pages asked readers to add this to their Podfile:
Why that breaks the build
On an Apple Silicon Mac the iPhone simulator runs on arm64. Excluding arm64 from the simulator
build therefore removes the only architecture the simulator can use, and the app stops building for
it. Apple Silicon arrived in late 2020 and is the whole current Mac lineup, so this affects
essentially every new developer machine. These are setup pages, so it is among the first
instructions a new Flutter developer follows.
Each page already carried a
<Warning>further down telling Apple Silicon users to exclude onlyi386instead. So the page contained both the wrong instruction and its correction, with the wrongone in the copyable code block and the correction below it. A developer who copied the block and
moved on got a broken build.
How I know the arm64 exclusion is not needed
Rather than check whichever version is newest, I followed the dependency each page tells the
reader to install, down to the iOS framework it resolves to, and read that XCFramework's own
Info.plist. These four pages span three different generations:sdk/flutter/setup.mdxcometchat_sdk: ^5.0.8(5.0.9)ios-arm64_x86_64-simulatorsdk/flutter/v4/setup.mdxcometchat_sdk: ^4.0.33ios-arm64_x86_64-simulatorsdk/flutter/3.0/setup.mdx,sdk/flutter/3.0/overview.mdxcometchat: any(3.0.13)ios-arm64_x86_64-simulatorAll three declare
SupportedPlatformVariant: simulatorwith arm64 among the supportedarchitectures. So on every path these pages cover, the simulator build has an arm64 slice available
and the exclusion only takes it away.
Why the line is deleted rather than narrowed
Narrowing to
i386would not be right either, for two reasons.The i386 half is inert.
i386is 32-bit Intel, and no supported Xcode builds an i386 simulatorslice, so the exclusion has nothing to act on. For completeness: the one i386 slice I found on these
paths is in the
CometChatStarscreamframework bundled with CometChatPro 3.0.920, whose simulatorlibrary is
ios-arm64_i386_x86_64-simulator. arm64 and i386 sit in the same library there, soexcluding i386 neither helps nor harms arm64.
The reader never needed to write it. Each of the three plugin versions above already sets this
in its own podspec:
cometchat_sdk5.0.9,ios/cometchat_sdk.podspecline 24cometchat_sdk4.0.33,ios/cometchat_sdk.podspecline 24cometchat3.0.13,ios/cometchat.podspecline 22With the arm64 half actively harmful and the i386 half both inert and already handled by the
plugin, nothing in the setting is worth keeping, so the whole Podfile block goes.
What changed on each page
post_installblock is removed, and the numbered steps that followed it arerenumbered. The block contained nothing but the
EXCLUDED_ARCHSline and Flutter's own defaultpost_installboilerplate, so no working instruction is lost.<Warning>is replaced with a<Note>aimed at readers who already followed the oldpage, telling them to remove the
arm64exclusion from their Podfile. Deleting the warningsilently would leave those readers with a broken project and no explanation. Each note names the
package that page actually installs, so the 3.0 pages refer to
cometchatand the others tocometchat_sdk.Pages:
sdk/flutter/setup.mdx,sdk/flutter/v4/setup.mdx,sdk/flutter/3.0/setup.mdx,sdk/flutter/3.0/overview.mdx.sdk/flutter/3.0/setup.mdxalso had its<Warning>sitting inside<Tabs>after the closing</Tab>. Removing it fixes that malformation too.Deliberately not in scope
separate review, so no calling page is touched here.
EXCLUDED_ARCHSalone doesnot find:
sdk/ios/2.0/overview.mdx,sdk/ios/2.0/setup.mdx,sdk/ios/3.0/overview.mdxandsdk/ios/3.0/setup.mdxeach have an "Excluded Architecture" section, andsdk/flutter/v4/troubleshooting.mdxhas a table row offering the exclusion as the fix for afailing simulator build. They need the same separate review and are not included.
calls/platform/compatibility.mdxalso mentions arm64, but only to state the supportedarchitecture, which is correct and left alone.
How the scope was established
git grep EXCLUDED_ARCHS -- '*.mdx'returns exactly seven files onmain. Three are calling pages,held back as above, leaving the four here. The prose search was run separately, because the
build-setting grep misses pages that give the same advice in words.
Note for the reviewer
A Mintlify preview will not build for a pull request from a fork until someone with write access
approves the commit, so the preview links show nothing until that approval.
🤖 Generated with Claude Code